package chen.huai.jie.spring.xmlconfig.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.PostConstruct;
import java.io.Serializable;

public class ApplicationProperties implements Serializable {
    private Logger logger = LoggerFactory.getLogger(ApplicationProperties.class);

    private String applicationName;
    private String applicationVersion;

    public String getApplicationName() {
        return applicationName;
    }

    public void setApplicationName(String applicationName) {
        this.applicationName = applicationName;
    }

    public String getApplicationVersion() {
        return applicationVersion;
    }

    public void setApplicationVersion(String applicationVersion) {
        this.applicationVersion = applicationVersion;
    }

    @Override
    public String toString() {
        return "ApplicationProperties{" +
                "applicationName='" + applicationName + '\'' +
                ", applicationVersion='" + applicationVersion + '\'' +
                '}';
    }

    @PostConstruct
    public void afterConstruct() {
        logger.info(toString());
    }
}
